package com.springinaction.knights.config;

import com.springinaction.knights.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 将两个接口进行装配
 */
@Configuration
public class KnightConfig {

    @Bean
    public Knight knight(){
        return new TestKnight(this.quest(),this.minstrel());
    }

    @Bean
    public Quest quest(){
        return new TestQuest(System.out);
    }

    @Bean
    public Minstrel minstrel(){
        return new Minstrel(System.out);
    }

}
